/*
 * XML Type:  XSpinner
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XSpinner
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XSpinner(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XSpinnerImpl extends com.seedwill.xul.widget.impl.XInputImpl implements com.seedwill.xul.widget.XSpinner
{
    private static final long serialVersionUID = 1L;
    
    public XSpinnerImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PAGEINCREMENT$0 = 
        new javax.xml.namespace.QName("", "pageIncrement");
    private static final javax.xml.namespace.QName DIGITS$2 = 
        new javax.xml.namespace.QName("", "digits");
    
    
    /**
     * Gets the "pageIncrement" element
     */
    public int getPageIncrement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAGEINCREMENT$0, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "pageIncrement" element
     */
    public org.apache.xmlbeans.XmlInt xgetPageIncrement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PAGEINCREMENT$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "pageIncrement" element
     */
    public boolean isSetPageIncrement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PAGEINCREMENT$0) != 0;
        }
    }
    
    /**
     * Sets the "pageIncrement" element
     */
    public void setPageIncrement(int pageIncrement)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PAGEINCREMENT$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PAGEINCREMENT$0);
            }
            target.setIntValue(pageIncrement);
        }
    }
    
    /**
     * Sets (as xml) the "pageIncrement" element
     */
    public void xsetPageIncrement(org.apache.xmlbeans.XmlInt pageIncrement)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(PAGEINCREMENT$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(PAGEINCREMENT$0);
            }
            target.set(pageIncrement);
        }
    }
    
    /**
     * Unsets the "pageIncrement" element
     */
    public void unsetPageIncrement()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PAGEINCREMENT$0, 0);
        }
    }
    
    /**
     * Gets the "digits" element
     */
    public int getDigits()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DIGITS$2, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "digits" element
     */
    public org.apache.xmlbeans.XmlInt xgetDigits()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DIGITS$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "digits" element
     */
    public boolean isSetDigits()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DIGITS$2) != 0;
        }
    }
    
    /**
     * Sets the "digits" element
     */
    public void setDigits(int digits)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DIGITS$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DIGITS$2);
            }
            target.setIntValue(digits);
        }
    }
    
    /**
     * Sets (as xml) the "digits" element
     */
    public void xsetDigits(org.apache.xmlbeans.XmlInt digits)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(DIGITS$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(DIGITS$2);
            }
            target.set(digits);
        }
    }
    
    /**
     * Unsets the "digits" element
     */
    public void unsetDigits()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DIGITS$2, 0);
        }
    }
}
